local huibian = fk.CreateSkill {
  name = "lingling__huibian",
}

Fk:loadTranslationTable{
  ["lingling__huibian"] = "挥鞭",
  [":lingling__huibian"] = "出牌阶段限一次，你可以将一张【杀】当【厉兵秣马】使用。",

  ["#lingling__huibian"] = "挥鞭：你可以将【杀】当【厉兵秣马】使用。",
}

huibian:addEffect("viewas", {
  anim_type = "drawcard",
  mute_card = false,
  prompt = "#lingling__huibian",
  handly_pile = true,
  card_filter = function (self, player, to_select, selected)
    return #selected == 0 and Fk:getCardById(to_select).trueName == "slash"
  end,
  view_as = function (self, player, cards)
    if #cards ~= 1 then return end
    local card = Fk:cloneCard("ling__groom_and_drill")
    card.skillName = huibian.name
    card:addSubcards(cards)
    return card
  end,
  enabled_at_play = function (self, player)
    return player:usedSkillTimes(huibian.name, Player.HistoryPhase) == 0
  end,
})

huibian:addAI(nil, "vs_skill")

return huibian
